{if $isheader == 1}
    <table style="width:100%; background-image:url({$rtvdir}/img/login-top-bg-small-updown.png); 
					background-repeat:repeat-x;
					border-collapse:collapse; border-spacing:0px;
					background-color:#2d475d;">
    <tr style="height:100%;padding:0px;">
        <td align="center" style="height:100%"> <span class="login-buttom-txt"> &nbsp; &copy; 
        	<script type="text/javascript">document.write((new Date()).getFullYear());</script> . 
        	<b><a href="{$url}" style="color:#ABCAD3;font-weight:bold; font-size:12px" target="_blank">{$lang['agentname']}</a>  
        	Powered by  <a href="#-gmis" style="color:#ABCAD3;font-weight:bold; font-size:12px">{$appname}</a></b>. 
        	{$lang['copyright']} </span>
			<input type="hidden" id="max_idle_time" value="{$max_idle_time}"/>
        </td>
    </tr>
    </table>
{/if}

<script async type="text/javascript">
//- create urlredir for this page.
//-- added by wadelau@ufqi.com on Thu Oct 24 11:35:21 CST 2013
(function(win){
 var url = '';
 var ipos = 0;
 var urlprefix = '//ufqi.com/naturedns/search?q=';
 var ndnstag = '#-'; //- tag userd in <a href="#-r/abbc">
 for(var i=0, l=document.links.length; i<l; i++){
 	url = document.links[i].href;
 	ipos = url.indexOf(ndnstag);
 	if(ipos > 0){
 		url = url.substring(ipos+1);
 		document.links[i].href = urlprefix + url;
	}
 }
 //window.alert(typeof console);
 if(typeof win.console !== 'undefined'){
 	win.console.log('-NatureDNS initiated.');
 	win.console.log('-gMIS , https://github.com/wadelau/gMIS , https://ufqi.com/dev/gmis');
 }
 })(window);
 
//- check signin active status
if(true){
var maxIdleObj = document.getElementById('max_idle_time');
var time2Stay = 35 * 60; //- seconds
if(typeof maxIdleObj != 'undefined' && maxIdleObj != null){ time2Stay = maxIdleObj.value; }
time2Stay *= 1000;
var time2Check = 10 * 1000; //- seconds
var time4Signin = (new Date()).getTime();
var time2Quit = time4Signin + time2Stay; 
if(typeof userinfo == 'undefined' || typeof userinfo.time2Quit == 'undefined'){ 
    if(typeof userinfo == 'undefined'){
        userinfo = {};
    }
}
userinfo.time2Quit = time2Quit; 
userinfo.time4Renew = time2Stay;
//-
function checkSignin(){
    var nowTime = (new Date()).getTime();
    time2Quit = userinfo.time2Quit;
    if(nowTime > time2Quit){
        //- ready to quit
	 	window.clearInterval(interval4Quit);
        window.location.href =  currentpath + '/?randi='+(Math.random());
        console.log("checkSignin togo: nowtime:"+nowTime+" time2Quit:"+time2Quit+" left:"+(time2Quit-nowTime)
			+" time2Stay:"+time2Stay+" time4sign:"+time4Signin);
    }
    else{
        //- stayed tune
        //console.log("checkSignin: nowtime:"+nowTime+" time2Quit:"+time2Quit+" left:"+(time2Quit-nowTime));
    }
}
var interval4Quit = window.setInterval(checkSignin, time2Check); 
}
//- check signin status, end
</script>

</body>
</html>